package com.bingqing.dao;

import com.bingqing.entity.Params;
import com.bingqing.entity.Type;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * ClassName: TypeDao
 * Package: com.bingqing.dao
 * Description:
 *
 * @Author liuyujie
 * @Create 2024-03-10 9:20
 * @Version 1.0
 */
@Repository
public interface TypeDao extends Mapper<Type> {
    List<Type> findBySearch(@Param("params") Params params);

    @Select("select * from type where name = #{name} limit 1")
    Type selectByName(String name);

    @Select("select * from type")
    List<Type> findAll();
}
